<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>9-文本属性值相关</title>
		<script type="text/javascript" src="js/jquery2.1.4.min.js"></script>
	</head>
	<body>
		<div class="box"></div>
		<span></span>
		<span></span>
		<input type="text" id="username" name="username" value="123">
		<script type="text/javascript">
			/**
			 * 原生写法:
			 * document.querySelector('.box').innerHTML='';
			 * document.querySelector('.box').innerText='';
			 * document.querySelector('#username').value;
			 */
			$(function(){
				$('.box').html("<span style='color:red;'>对么?</span>");
				$('span').eq(0).text("<span style='color:red;'>对么?</span>");
			
				alert($('#username').val());
			});
			
		</script>
	</body>
</html>
